package org.project.api.Vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.project.pojo.monthSale;
import org.project.utils.ArraysUtils;

/**
 * @Auther: hzy
 * @Date: 2022/4/13 14:43
 * @Description: 商品月销售额
 */
@Data
public class monthSaleVo {

    @ApiModelProperty(value = "月份")
    private Integer[] month;

    @ApiModelProperty(value = "月销售额")
    private Double[] sale;

    public monthSaleVo(monthSale val) {
        this.month = ArraysUtils.processLineInt(val.getMonth().substring(1, val.getMonth().length() - 1).split(","));
        this.sale = ArraysUtils.processLine(val.getSale().substring(1, val.getSale().length() - 1).split(","));
    }
}
